from time import sleep
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select

driver = webdriver.Chrome()
driver.get("http://192.168.46.5:18089/login")
driver.maximize_window()
driver.find_element(By.NAME,'username').send_keys("XTGLY")
driver.find_element(By.CLASS_NAME,'password').send_keys("123456")
driver.find_element(By.ID,"signIn").click()
sleep(3)


# 找到下拉框对象
sss=driver.find_element(By.ID,'select_class_bug')

# print(sss)

Select(sss).select_by_index(0)


# from time import sleep
# from selenium import webdriver
# from selenium.webdriver.common.by import By
# driver = webdriver.Chrome()
# driver.get("http://192.168.9.3:10002")
# driver.maximize_window()
# driver.find_element(By.NAME,'username').send_keys("XTGLY")
# driver.find_element(By.CLASS_NAME,'password').send_keys("123456")
# driver.find_element(By.ID,"signIn").click()
# sleep(3)
# driver.find_elements(By.TAG_NAME,"option")[0].click()